




/*
'===============================================================================
'  MP.LayerHelper.MP_OBS.BL.MbRoleModulesManagerBase
'===============================================================================
*/

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using MP.LayerHelper.MP_OBS.BLL;
using MP.LayerHelper.MP_OBS.DAL;
using MP.LayerHelper.MP_OBS.DAL.EntityClasses;
using MP.LayerHelper.MP_OBS.DAL.FactoryClasses;
using MP.LayerHelper.MP_OBS.DAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace MP.LayerHelper.MP_OBS.BLL
{
	public class MbRoleModulesManagerBase : ManagerBase
	{
		/// <summary>
		/// Purpose: Class constructor.
		/// </summary>
		
		public MbRoleModulesManagerBase()
		{
			// Nothing for now.
		}
		
		public override string TableName()
        {
            return "MbRoleModules";
        }
		
		public MbRoleModulesEntity Insert(MbRoleModulesEntity _MbRoleModulesEntity)
		{
			return Insert(_MbRoleModulesEntity, "");
		}
		
		public MbRoleModulesEntity Insert(MbRoleModulesEntity _MbRoleModulesEntity, string controlId)
		{
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.SaveEntity(_MbRoleModulesEntity, true);
				MbRoleModulesFields field = new MbRoleModulesFields();
                LogEntity(_MbRoleModulesEntity, field, AcInsert, controlId);
			}
			return _MbRoleModulesEntity;
		}

		
		public MbRoleModulesEntity Insert(Guid Id, Guid ApplicationId, string ApplicationName, Guid RoleId, string RoleName, string ModCode, Guid DepartId, bool IsShow, bool IsShowToUser, bool IsAdd, bool IsEdit, bool IsEditToUser, bool IsDelete, bool IsDeleteToUser, bool IsExport, bool IsPrint, bool IsEnable, bool IsDisable, bool IsAll, DateTime UpdatedDate, string UpdatedBy)
		{
			MbRoleModulesEntity _MbRoleModulesEntity = new MbRoleModulesEntity();
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				
				_MbRoleModulesEntity.Id = Id;
				_MbRoleModulesEntity.ApplicationId = ApplicationId;
				_MbRoleModulesEntity.ApplicationName = ApplicationName;
				_MbRoleModulesEntity.RoleId = RoleId;
				_MbRoleModulesEntity.RoleName = RoleName;
				_MbRoleModulesEntity.ModCode = ModCode;
				_MbRoleModulesEntity.DepartId = DepartId;
				_MbRoleModulesEntity.IsShow = IsShow;
				_MbRoleModulesEntity.IsShowToUser = IsShowToUser;
				_MbRoleModulesEntity.IsAdd = IsAdd;
				_MbRoleModulesEntity.IsEdit = IsEdit;
				_MbRoleModulesEntity.IsEditToUser = IsEditToUser;
				_MbRoleModulesEntity.IsDelete = IsDelete;
				_MbRoleModulesEntity.IsDeleteToUser = IsDeleteToUser;
				_MbRoleModulesEntity.IsExport = IsExport;
				_MbRoleModulesEntity.IsPrint = IsPrint;
				_MbRoleModulesEntity.IsEnable = IsEnable;
				_MbRoleModulesEntity.IsDisable = IsDisable;
				_MbRoleModulesEntity.IsAll = IsAll;
				_MbRoleModulesEntity.UpdatedDate = UpdatedDate;
				_MbRoleModulesEntity.UpdatedBy = UpdatedBy;
				MbRoleModulesFields field = new MbRoleModulesFields();
                LogEntity(_MbRoleModulesEntity, field, AcInsert);
				adapter.SaveEntity(_MbRoleModulesEntity, true);
			}
			return _MbRoleModulesEntity;
		}

		public MbRoleModulesEntity Insert(Guid ApplicationId, string ApplicationName, Guid RoleId, string RoleName, string ModCode, Guid DepartId, bool IsShow, bool IsShowToUser, bool IsAdd, bool IsEdit, bool IsEditToUser, bool IsDelete, bool IsDeleteToUser, bool IsExport, bool IsPrint, bool IsEnable, bool IsDisable, bool IsAll, DateTime UpdatedDate, string UpdatedBy)
		{
			MbRoleModulesEntity _MbRoleModulesEntity = new MbRoleModulesEntity();
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				
				_MbRoleModulesEntity.ApplicationId = ApplicationId;
				_MbRoleModulesEntity.ApplicationName = ApplicationName;
				_MbRoleModulesEntity.RoleId = RoleId;
				_MbRoleModulesEntity.RoleName = RoleName;
				_MbRoleModulesEntity.ModCode = ModCode;
				_MbRoleModulesEntity.DepartId = DepartId;
				_MbRoleModulesEntity.IsShow = IsShow;
				_MbRoleModulesEntity.IsShowToUser = IsShowToUser;
				_MbRoleModulesEntity.IsAdd = IsAdd;
				_MbRoleModulesEntity.IsEdit = IsEdit;
				_MbRoleModulesEntity.IsEditToUser = IsEditToUser;
				_MbRoleModulesEntity.IsDelete = IsDelete;
				_MbRoleModulesEntity.IsDeleteToUser = IsDeleteToUser;
				_MbRoleModulesEntity.IsExport = IsExport;
				_MbRoleModulesEntity.IsPrint = IsPrint;
				_MbRoleModulesEntity.IsEnable = IsEnable;
				_MbRoleModulesEntity.IsDisable = IsDisable;
				_MbRoleModulesEntity.IsAll = IsAll;
				_MbRoleModulesEntity.UpdatedDate = UpdatedDate;
				_MbRoleModulesEntity.UpdatedBy = UpdatedBy;
				adapter.SaveEntity(_MbRoleModulesEntity, true);
				MbRoleModulesFields field = new MbRoleModulesFields();
                LogEntity(_MbRoleModulesEntity, field, AcInsert);
			}
			return _MbRoleModulesEntity;
		}
		
		public bool Update(MbRoleModulesEntity _MbRoleModulesEntity)
        {
            return Update(_MbRoleModulesEntity, "");
        }

		public bool Update(MbRoleModulesEntity _MbRoleModulesEntity, string controlId)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				RelationPredicateBucket filter = new RelationPredicateBucket();
				IPredicateExpression _PredicateExpression = new PredicateExpression();
				_PredicateExpression.Add(MbRoleModulesFields.Id == _MbRoleModulesEntity.Id);
					
				filter.PredicateExpression.Add(_PredicateExpression);

				adapter.UpdateEntitiesDirectly(_MbRoleModulesEntity, filter);
				toReturn = true;
				
				MbRoleModulesFields field = new MbRoleModulesFields();
                LogEntity(_MbRoleModulesEntity, field, AcUpdate, controlId);
			}
			return toReturn;
		}
		
		public bool Update(MbRoleModulesEntity _MbRoleModulesEntity, RelationPredicateBucket filter)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.UpdateEntitiesDirectly(_MbRoleModulesEntity, filter);
				toReturn = true;
				
				MbRoleModulesFields field = new MbRoleModulesFields();
                LogEntity(_MbRoleModulesEntity, field, AcUpdate);
			}
			return toReturn;
		}

		public bool Update(Guid Id, Guid ApplicationId, string ApplicationName, Guid RoleId, string RoleName, string ModCode, Guid DepartId, bool IsShow, bool IsShowToUser, bool IsAdd, bool IsEdit, bool IsEditToUser, bool IsDelete, bool IsDeleteToUser, bool IsExport, bool IsPrint, bool IsEnable, bool IsDisable, bool IsAll, DateTime UpdatedDate, string UpdatedBy)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				MbRoleModulesEntity _MbRoleModulesEntity = new MbRoleModulesEntity(Id);
				if (adapter.FetchEntity(_MbRoleModulesEntity))
				{
				
					_MbRoleModulesEntity.ApplicationId = ApplicationId;
					_MbRoleModulesEntity.ApplicationName = ApplicationName;
					_MbRoleModulesEntity.RoleId = RoleId;
					_MbRoleModulesEntity.RoleName = RoleName;
					_MbRoleModulesEntity.ModCode = ModCode;
					_MbRoleModulesEntity.DepartId = DepartId;
					_MbRoleModulesEntity.IsShow = IsShow;
					_MbRoleModulesEntity.IsShowToUser = IsShowToUser;
					_MbRoleModulesEntity.IsAdd = IsAdd;
					_MbRoleModulesEntity.IsEdit = IsEdit;
					_MbRoleModulesEntity.IsEditToUser = IsEditToUser;
					_MbRoleModulesEntity.IsDelete = IsDelete;
					_MbRoleModulesEntity.IsDeleteToUser = IsDeleteToUser;
					_MbRoleModulesEntity.IsExport = IsExport;
					_MbRoleModulesEntity.IsPrint = IsPrint;
					_MbRoleModulesEntity.IsEnable = IsEnable;
					_MbRoleModulesEntity.IsDisable = IsDisable;
					_MbRoleModulesEntity.IsAll = IsAll;
					_MbRoleModulesEntity.UpdatedDate = UpdatedDate;
					_MbRoleModulesEntity.UpdatedBy = UpdatedBy;
					adapter.SaveEntity(_MbRoleModulesEntity, true);
					toReturn = true;
					
					MbRoleModulesFields field = new MbRoleModulesFields();
					LogEntity(_MbRoleModulesEntity, field, AcUpdate);
				}
			}
			return toReturn;
		}

		public bool Delete(Guid Id)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				MbRoleModulesEntity _MbRoleModulesEntity = new MbRoleModulesEntity(Id);
				if (adapter.FetchEntity(_MbRoleModulesEntity))
				{
					adapter.DeleteEntity(_MbRoleModulesEntity);
					toReturn = true;
				}
			}
			return toReturn;
		}
		
		public void DeleteAll() 
		{
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", null);
			}
		}
		
		
		public int DeleteById(Guid Id)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByApplicationId(Guid ApplicationId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationId == ApplicationId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByApplicationName(string ApplicationName)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationName == ApplicationName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByRoleId(Guid RoleId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleId == RoleId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByRoleName(string RoleName)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleName == RoleName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByModCode(string ModCode)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ModCode == ModCode);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByDepartId(Guid DepartId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsShow(bool IsShow)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShow == IsShow);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsShowToUser(bool IsShowToUser)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShowToUser == IsShowToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsAdd(bool IsAdd)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAdd == IsAdd);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsEdit(bool IsEdit)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEdit == IsEdit);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsEditToUser(bool IsEditToUser)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEditToUser == IsEditToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsDelete(bool IsDelete)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDelete == IsDelete);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsDeleteToUser(bool IsDeleteToUser)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDeleteToUser == IsDeleteToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsExport(bool IsExport)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsExport == IsExport);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsPrint(bool IsPrint)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsPrint == IsPrint);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsEnable(bool IsEnable)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEnable == IsEnable);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsDisable(bool IsDisable)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDisable == IsDisable);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsAll(bool IsAll)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAll == IsAll);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByUpdatedDate(DateTime UpdatedDate)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByUpdatedBy(string UpdatedBy)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("MbRoleModulesEntity", filter);
			}
			return toReturn;
		}
		

		
		public MbRoleModulesEntity SelectOne(Guid Id)
		{
			MbRoleModulesEntity toReturn = null;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				MbRoleModulesEntity _MbRoleModulesEntity = new MbRoleModulesEntity(Id);
				if (adapter.FetchEntity(_MbRoleModulesEntity))
				{
					toReturn = _MbRoleModulesEntity;
				}
			}
			return toReturn;
		}

		// Return DataTable
		public DataTable SelectAllRDT()
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, null, true);
			}
			return toReturn;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectAllLST()
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, null, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectAllLST_Paged(int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, null, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIdLST(Guid Id)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIdLST_Paged(Guid Id, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIdRDT(Guid Id)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIdRDT_Paged(Guid Id, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByApplicationIdLST(Guid ApplicationId)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationId == ApplicationId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByApplicationIdLST_Paged(Guid ApplicationId, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationId == ApplicationId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByApplicationIdRDT(Guid ApplicationId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationId == ApplicationId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByApplicationIdRDT_Paged(Guid ApplicationId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationId == ApplicationId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByApplicationNameLST(string ApplicationName)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationName == ApplicationName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByApplicationNameLST_Paged(string ApplicationName, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationName == ApplicationName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByApplicationNameRDT(string ApplicationName)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationName == ApplicationName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByApplicationNameRDT_Paged(string ApplicationName, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ApplicationName == ApplicationName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByRoleIdLST(Guid RoleId)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleId == RoleId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByRoleIdLST_Paged(Guid RoleId, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleId == RoleId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByRoleIdRDT(Guid RoleId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleId == RoleId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByRoleIdRDT_Paged(Guid RoleId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleId == RoleId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByRoleNameLST(string RoleName)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleName == RoleName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByRoleNameLST_Paged(string RoleName, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleName == RoleName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByRoleNameRDT(string RoleName)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleName == RoleName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByRoleNameRDT_Paged(string RoleName, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.RoleName == RoleName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByModCodeLST(string ModCode)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ModCode == ModCode);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByModCodeLST_Paged(string ModCode, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ModCode == ModCode);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByModCodeRDT(string ModCode)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ModCode == ModCode);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByModCodeRDT_Paged(string ModCode, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.ModCode == ModCode);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByDepartIdLST(Guid DepartId)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByDepartIdLST_Paged(Guid DepartId, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByDepartIdRDT(Guid DepartId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByDepartIdRDT_Paged(Guid DepartId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.DepartId == DepartId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsShowLST(bool IsShow)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShow == IsShow);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsShowLST_Paged(bool IsShow, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShow == IsShow);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsShowRDT(bool IsShow)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShow == IsShow);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsShowRDT_Paged(bool IsShow, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShow == IsShow);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsShowToUserLST(bool IsShowToUser)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShowToUser == IsShowToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsShowToUserLST_Paged(bool IsShowToUser, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShowToUser == IsShowToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsShowToUserRDT(bool IsShowToUser)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShowToUser == IsShowToUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsShowToUserRDT_Paged(bool IsShowToUser, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsShowToUser == IsShowToUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsAddLST(bool IsAdd)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAdd == IsAdd);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsAddLST_Paged(bool IsAdd, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAdd == IsAdd);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsAddRDT(bool IsAdd)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAdd == IsAdd);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsAddRDT_Paged(bool IsAdd, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAdd == IsAdd);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsEditLST(bool IsEdit)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEdit == IsEdit);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsEditLST_Paged(bool IsEdit, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEdit == IsEdit);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsEditRDT(bool IsEdit)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEdit == IsEdit);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsEditRDT_Paged(bool IsEdit, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEdit == IsEdit);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsEditToUserLST(bool IsEditToUser)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEditToUser == IsEditToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsEditToUserLST_Paged(bool IsEditToUser, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEditToUser == IsEditToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsEditToUserRDT(bool IsEditToUser)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEditToUser == IsEditToUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsEditToUserRDT_Paged(bool IsEditToUser, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEditToUser == IsEditToUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsDeleteLST(bool IsDelete)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDelete == IsDelete);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsDeleteLST_Paged(bool IsDelete, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDelete == IsDelete);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeleteRDT(bool IsDelete)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDelete == IsDelete);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeleteRDT_Paged(bool IsDelete, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDelete == IsDelete);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsDeleteToUserLST(bool IsDeleteToUser)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDeleteToUser == IsDeleteToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsDeleteToUserLST_Paged(bool IsDeleteToUser, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDeleteToUser == IsDeleteToUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeleteToUserRDT(bool IsDeleteToUser)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDeleteToUser == IsDeleteToUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeleteToUserRDT_Paged(bool IsDeleteToUser, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDeleteToUser == IsDeleteToUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsExportLST(bool IsExport)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsExport == IsExport);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsExportLST_Paged(bool IsExport, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsExport == IsExport);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsExportRDT(bool IsExport)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsExport == IsExport);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsExportRDT_Paged(bool IsExport, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsExport == IsExport);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsPrintLST(bool IsPrint)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsPrint == IsPrint);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsPrintLST_Paged(bool IsPrint, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsPrint == IsPrint);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsPrintRDT(bool IsPrint)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsPrint == IsPrint);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsPrintRDT_Paged(bool IsPrint, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsPrint == IsPrint);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsEnableLST(bool IsEnable)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEnable == IsEnable);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsEnableLST_Paged(bool IsEnable, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEnable == IsEnable);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsEnableRDT(bool IsEnable)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEnable == IsEnable);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsEnableRDT_Paged(bool IsEnable, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsEnable == IsEnable);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsDisableLST(bool IsDisable)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDisable == IsDisable);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsDisableLST_Paged(bool IsDisable, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDisable == IsDisable);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsDisableRDT(bool IsDisable)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDisable == IsDisable);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsDisableRDT_Paged(bool IsDisable, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsDisable == IsDisable);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsAllLST(bool IsAll)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAll == IsAll);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByIsAllLST_Paged(bool IsAll, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAll == IsAll);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsAllRDT(bool IsAll)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAll == IsAll);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsAllRDT_Paged(bool IsAll, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.IsAll == IsAll);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByUpdatedDateLST(DateTime UpdatedDate)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByUpdatedDateLST_Paged(DateTime UpdatedDate, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedDateRDT(DateTime UpdatedDate)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedDateRDT_Paged(DateTime UpdatedDate, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByUpdatedByLST(string UpdatedBy)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return EntityCollection<MbRoleModulesEntity>
		public EntityCollection<MbRoleModulesEntity> SelectByUpdatedByLST_Paged(string UpdatedBy, int PageNumber, int PageSize)
		{
			EntityCollection<MbRoleModulesEntity> _MbRoleModulesCollection = new EntityCollection<MbRoleModulesEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_MbRoleModulesCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _MbRoleModulesCollection;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedByRDT(string UpdatedBy)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedByRDT_Paged(string UpdatedBy, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _MbRoleModulesCollection = new EntityCollection(new MbRoleModulesEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(MbRoleModulesFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_MbRoleModulesCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		

	}
}
